<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page isELIgnored="false" %>
							<!-- ----------------------------- -->
							<!-- tiles/movie/detail.jsp STARTS -->
							<!-- ----------------------------- -->
<script>
  $(document).ready(function() {	
	  //初始化评分系统
	  rating.initRating("rating_star_<s:property value='movie.id'/>", <s:property value='movie.statistics.scoreDisplay'/>, <s:property value='movie.id'/>, false, rating.sendMovieScore);	
	  rating.clickBinding(<s:property value='movie.id'/>);
	  
	  //统计点击次数
	  $.ajax({ data: {"movieId": <s:property value='movie.id'/>}, url: 'updateStatistics!updateClicked.action'});
	  
	  basicForm.init();
  });

</script>

<!-- 编辑基本信息窗口 -->
<div id="editBasicDialog" title="编辑基本信息" style="display:none;">
	<p class="validateTips"></p>
	<form id="basicForm" action="video!addVideo" method="post">
	  <input type="hidden" name="video.movie.id" value="<s:property value='movie.id'/>"/>
	  <input type="hidden" name="video.account.id" value="<s:property value='#session.account.id'/>"/>
	  <input id="videoId" type="hidden" name="video.id" value="<s:property value='video.id'/>"/>
	  <p>	
		<span class="dialog-label">电影:</span>
		<span class="dialog-input"><s:property value="movie.nameCn" escape="false"/></span>
		<span class="dialog-input"><s:property value="movie.name" /></span>
	  </p>
	  <p>	
		<span class="dialog-label">上映:</span>
		<span class="dialog-input">
		   <s:textfield name="movie.datetime"> 
                  <s:param name="value" ><s:date name="movie.datetime" format="MM/dd/yyyy" /></s:param> 
           </s:textfield>	(MM/DD/YYYY)
  		</span>		
	  </p>
	  <p>	
		<span class="dialog-label">编剧:</span>
		<span class="dialog-input">		 
		  <s:textfield id="screenplay" name="video.provider" theme="simple" size="10" readonly="true" cssStyle="background-color:#cccccc"/>
		  <a id="selectViedoSrc" style="cursor:pointer;">...</a>		  
		</span>		
	  </p>
	  <p>	
		<span class="dialog-label">导演:</span>
		<span class="dialog-input">		 
		  <s:textfield id="director" name="video.provider" theme="simple" size="10" readonly="true" cssStyle="background-color:#cccccc"/>
		  <a id="selectViedoSrc" style="cursor:pointer;">...</a>		  
		</span>		
	  </p>
	  <p>	
		<span class="dialog-label">主演:</span>
		<span class="dialog-input">		 
		  <s:textfield id="actor" name="video.provider" theme="simple" size="10" readonly="true" cssStyle="background-color:#cccccc"/>
		  <a id="selectViedoSrc" style="cursor:pointer;">...</a>		  
		</span>		
	  </p>
	  
	  <p>	
		<span class="dialog-label">地区:</span>
		<span class="dialog-input">
		  <s:select id="quality" name="video.type" list="#{0:'标清',1:'高清',2:'超清'}"  listKey="key" listValue="value"  theme="simple"></s:select>
		</span>		
	  </p>
	  <p>	
		<span class="dialog-label">语言:</span>
		<span class="dialog-input"><s:textfield id="language" name="video.url" theme="simple" size="45"/></span>		
	  </p>	  
	  <p>	
		<span class="dialog-label">分类:</span>
		<span class="dialog-input"><s:textfield id="category" name="video.length" theme="simple" /></span>
	  </p>
	  <p>	
		<span class="dialog-label">长度:</span>
		<span class="dialog-input"><s:textfield id="lengthMovie" name="video.length" theme="simple" /></span>
	  </p>
	</form>
</div>

<div id="placeholder1" class="placeholder odd clearfix">
	<div class="nomineeNavigation">
		<a style="display:none;" class="previousNominee" href="javascript:history.go(-1);">后退</a>
		<div class="nomineeNavigationNominee">
			<div style="margin-top:20px;"><h3><s:property value="movie.nameCn" escape="false"/> <s:property value="movie.name" /></h3></div>			
			<p class="extraInfo1">
				<s:property value="movie.calendar.displayName" escape="false"/>
			</p>
			
		<a style="display:none;" class="nextNominee" href="javascript:history.go(1);">前进</a>
	</div>
</div>
<!-- placeholder1 -->

<div class="clear"></div>

<!-- leftRail -->
<div class="leftRail clearfix">
	<!-- placeholder2 -->
	<div id="placeholder2" class="placeholder even clearfix">
		<div class="nomineeContentNav">
			<ul>
				<li><a href="###" class="movietrailer active"> <span class="title">基本信息</span> </a></li>
				<li><a href="#Aplot" class="synopsis "> <span class="title">剧情</span> </a></li>
				<li><a style="display: block;" href="movie!images?movie.id=<s:property value='movie.id'/>" class="photos"> <span class="title">图片</span> </a></li>
				<li><a href="#Avideo" class="video "> <span class="title">Movie Trailer</span> </a></li>
				<li><a href="#Aaward" class="history"> <span class="title">Photos</span></a></li>
				<li><a href="#Arelated" class="speech "> <span class="title">Movie Trailer</span> </a></li>
				<li><a href="#Acomment" class="questionnaire "> <span class="title">Movie Trailer</span> </a></li>
			</ul>
		</div>
	</div>
	<!-- // placeholder2 -->
	<div class="clear"></div>
</div>
<!-- // leftRail -->

<div class="rightRail">
	<div id="placeholder3" class="placeholder even clearfix">
		
		<div id="bio-container">
			<div id="bio-left" style="border-right-style: none; border-right-width: initial; border-right-color: initial; width: 640px;">
				<div class="scrollbarpaper-container" style="width: 26px; display: none;">
					<div class="scrollbarpaper-track">
						<div class="scrollbarpaper-drag">
							<div class="scrollbarpaper-drag-top"></div>
							<div class="scrollbarpaper-drag-bottom"></div>
						</div>
					</div>
				</div>
				
				
				<div id="basic" style="display: block;">
					<div id="bio-title">
						<span id="bio-name"><s:property value="movie.nameCn" escape="false"/></span> 
						<span class="bio-type"><s:property value="movie.name" /></span>
						
					</div>
					<div style="float:right;margin-right:12px;">
						<s:if test="#session.account!=null">
							<a id="editBasic" style="cursor:pointer;">编辑</a>
						</s:if><s:else>
							<a id="loginFromEditBasic" style="cursor:pointer;">编辑</a>
						</s:else>
					</div>
					<div id="bio-content" class="gt" >
					    <div style="float: right;">
							<img src="<s:property value='movie.image.src'/>" style="height:250px; display:block;"/>
							
							<!-- badu -->
	                        <div id="bdshare" class="bdshare_b" style="float: right;line-height: 12px; margin-top:4px;" 
								data="{'text':'分享：<s:property value='movie.calendar.displayName'/>奥斯卡经典影片《#<s:property value='movie.displayName' escape='false'/>#》 -- 奥斯卡中文网', 
        						'pic':'<s:property value="movie.image.src"/>',
       	 						'url':'http://www.oscarchinese.com/movie!load?movie.id=<s:property value='movie.id'/>'}" >
							  <img src="img/social_banner.png" />
							</div>
							<script type="text/javascript" id="bdshare_js" data="type=button&amp;uid=158997" ></script>
							<script type="text/javascript" id="bdshell_js"></script>
							<script type="text/javascript">								    
							document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?t=1";
							</script>
							<!-- Baidu Button END -->
					
						</div>						
						
						<p >
							<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">上映：</span>
							<span style="font-size: 12px;color: #6B6B6B; margin: 0 auto 6px;"><s:property value='movie.displayDatetime'/></span>
						</p>
						<p>
							<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">导演：</span>
							<span class="bio-type">
							<s:iterator value="movie.mprs" status="stat">
								<s:if test="role.id==1"><a href="person!load?person.id=<s:property value='person.id'/>"><s:property value="person.displayName" escape="false"/></a></s:if>
							</s:iterator>
							</span>
							<br/>
						</p>
						<p >
							<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">主演：</span>
							<span class="bio-type">
							<s:iterator value="movie.mprs" status="stat">
								<s:if test="role.id>=2 && role.id<=5"><a href="person!load?person.id=<s:property value='person.id'/>"><s:property value="person.displayName" escape="false"/></a></s:if>
							</s:iterator>
							</span>
						</p>
						
						<p >
							<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">地区：</span>
							<span style="font-size: 12px;color: #6B6B6B; margin: 0 auto 6px;">
								<s:iterator value="movie.countries" status="stat">
									<s:property value="nameCn" escape="false"/>
								</s:iterator>
							</span>
						</p>
						
						
						<p >
							<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">语言：</span>
							<span style="font-size: 12px;color: #6B6B6B; margin: 0 auto 6px;">
								<s:iterator value="movie.languages" status="stat">
									<s:property value="nameCn" escape="false"/>
								</s:iterator>
							</span>
						</p>
						
						<p >
						<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">分类：</span>
							<span class="bio-type">
								<s:iterator value="movie.categories" status="stat">
									<s:property value="nameCn" escape="false"/>
								</s:iterator>
							</span>
						</p>
						<!--  -->
						<p >
							<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">长度：</span>
							<span style="font-size: 12px;color: #6B6B6B; margin: 0 auto 6px;"><s:property value='movie.length'/>分钟</span>
						</p>
						<p style="border: 0px solid red;">
							<span style="font-size: 14px;color: #b1b1b1; margin: 0 auto 6px;">评分：</span>
							<div id="ratingDiv" style="float:left;margin-top: -60px;margin-left: 40px;">
							  <font color="#6C6C6C"><div id="rating_star_<s:property value='movie.id'/>"></div></font>
							</div>							
						</p>
						
					</div>
					
					<div id="statistics" style="float:left; text-align:left;margin:-30px 0px 0px 20px;color:#B1B1B1">
							评分: <font color="#6C6C6C"><div id="scored" style="display:inline;"><s:property value="movie.statistics.scored"/></div></font> 人 | 
							<a id="watchedLink" href="javascript:">已看</a>: <font color="#6C6C6C"><div id="watched" style="display:inline;"><s:property value="movie.statistics.watched"/></div></font> 人  |    
							<a id="wantedLink" href="javascript:">想看</a>: <font color="#6C6C6C"><div id="wanted" style="display:inline;"><s:property value="movie.statistics.wanted"/></div></font> 人   							 							 
														
					</div>
					<div style="clear: both;"></div>
				
				</div>
				
				
				<!-- 
				<div id="bio-scrollcontainer">
					<div id="bio-header" style="width: 640px;">
						<div id="bio-title"><span id="bio-name">127 Hours</span> <span class="bio-type">Synopsis</span></div>
						<div id="bio-content">
							
						</div>
					</div>
					<div style="clear: both;"></div>
				</div>
				 -->
			</div>
		</div>
		<!-- bio-container -->
	</div>
	<!-- placeholder3 -->
</div>
<!-- rightRail -->

<div class="clear"></div>
							<!-- --------------------------- -->
							<!-- tiles/movie/detail.jsp ENDS -->
							<!-- --------------------------- -->